﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
<!--[if IE 8]>
<html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]>
<html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html lang="en" class="no-js"> <!--<![endif]-->
<!-- BEGIN HEAD -->

<head>
    <include file="Public:meta"/>
</head>
<!-- END HEAD -->
<!-- BEGIN BODY -->
<body class="page-header-fixed">
<include file="Public:header"/>
<!-- BEGIN CONTAINER -->
<div class="page-container">
    <include file="Public:sidebar"/>
    <!-- BEGIN PAGE -->
    <div class="page-content">
        <!-- BEGIN PAGE CONTAINER-->
        <div class="container-fluid">
            <!-- BEGIN PAGE HEADER-->
            <div class="row-fluid">
                 <!-- begin BCN -->
                <div class="row-fluid">
                    <div class="span12"><ul class="breadcrumb"><li><i class="icon-home"></i><a onfocus="blurLink(this);" href="{:U('Index/index')}">首页</a>&nbsp;<span class="icon-angle-right"></span>&nbsp;</li><li><a onfocus="blurLink(this);" href="{:U(CONTROLLER_NAME . '/index', 'kept=1')}">{$ParentPageName|default="未命名"}</a>&nbsp;<span class="icon-angle-right"></span>&nbsp;</li><li>{$PageName|default="未命名"}</li></ul></div>
                </div>
                <!-- end BCN -->
            </div>
            <!-- END PAGE HEADER-->
            <!-- BEGIN PAGE CONTENT-->
            <div class="row-fluid  white">
                <div class="span12">
                    <!-- begin 高级搜索 -->
                    <form id="filter_form" class="form-horizontal form-common adv-search-box" method="get" action="">
                        <input name="m" type="hidden" value="{:(MODULE_NAME)}">
                        <input name="c" type="hidden" value="{:(CONTROLLER_NAME)}">
                        <input name="a" type="hidden" value="index">
                        <input name="filter" type="hidden" value="1">
                        <div class="box">
                            <div class="portlet-title">
                                <div class="caption"><i class="icon-search"></i>高级搜索</div>
                                <div class="tools"><a href="javascript:;" class="collapse"></a></div>
                            </div>
                            <div class="portlet-body">
								<div class="row-fluid">
                                    <div class="span4">
                                        <div class="control-group control-common">
                                            <label class="control-label"><span>商品名称</span></label>
                                            <div class="controls">
                                                <input type="text" class="m-wrap span8" value="{$Think.get.name}" name="name">
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="search-actions">
                                    <button class="btn blue" id="filter" type="submit">筛选<i class="icon-filter"></i></button>
                                    <a href="{:U(CONTROLLER_NAME.'/index')}" class="btn">重置</a>
                                </div>
                            </div>
                        </div>
                    </form>
                    <!-- end 高级搜索 -->

                    <!-- begin 操作与分页 -->
                    <div class="row-fluid ">
                        <div class="dataTables_length pull-left">
                            <form id="limit_form" name="limit_form" method="post" action="">
                                <label for="limit_num">
                                    <select class="limit_num" id="limit_num" name="limit_num">
                                    <volist name="page_limit_num" id="vo">
                                        <option <eq name="_SESSION['page_limit_num']" value="$vo"> selected="selected" </eq> value="{$vo}">{$vo}</option>
                                    </volist>
                                    </select>
                                    个记录/每个页面
                                </label>
                            </form>
                        </div>
                        <div class="btn-item pull-left">
                            <if condition="checkAccess(CONTROLLER_NAME, 'save')">
                                <a class="btn blue" href="{:U(CONTROLLER_NAME.'/save')}">添加<i class="icon-plus"></i></a>
                            </if>
                        </div>
                    </div>
                    <!-- end 操作与分页 -->
                    
                    <div class="portlet-body">
                        <table class="table table-striped table-hover table-bordered">
                            <thead>
                            <tr>
                                <th>商品名称</th>
                                <th>分类</th>
                                <th>商品规格</th>
                                <th>商品编码</th>
                                <th>零售价</th>
                                <th>成本价</th>
                                <th>分销价</th>
                                <th>库存</th>
                                <th>参团参考价</th>
                                <th>运费</th>
                                <th>商品状态</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <notempty name="list">
                                <tbody>
                                    <volist name="list" id="vo" key="k">
                                    <tr>
                                        <td>
                                            {$vo.name}
                                        </td>
                                        <td>{$vo.category_id|getTitle=category}</td>
                                        <td>
                                            <if condition="$vo['type'] eq 0">
                                                单规格
                                            <else/>
                                                <div>
                                                    <volist name="vo.info" id="v">
                                                        <div>{$v.assistant}</div>
                                                    </volist>
                                                </div>
                                            </if>
                                        </td>
                                        <td>
                                            <div>
                                                <volist name="vo.info" id="v">
                                                    <div>{$v.sku}</div>
                                                </volist>
                                            </div>
                                        </td>
                                        <td>
                                            <div>
                                                <volist name="vo.info" id="v">
                                                    <div>{$v.sale_price}</div>
                                                </volist>
                                            </div>
                                        </td>
                                        <td>
                                            <div>
                                                <volist name="vo.info" id="v">
                                                    <div>{$v.cost_price}</div>
                                                </volist>
                                            </div>
                                        </td>
                                        <td>
                                            <div>
                                                <volist name="vo.info" id="v">
                                                    <div>{$v.distribution_price}</div>
                                                </volist>
                                            </div>
                                        </td>
                                        <td class="hidden-phone">
                                            <div>
                                                <volist name="vo.info" id="v">
                                                    <div>{$v.stock}</div>
                                                </volist>
                                            </div>
                                        </td>
                                        <td>
                                            {$vo.suggest_start_price} - {$vo.suggest_end_price}
                                        </td>
                                        <td>
                                            {$vo.postage_price}
                                        </td>
                                        <td class="hidden-phone">
                                            <eq name="vo.hidden" value="0">
                                                <span class="label label-success">出售中</span>   
                                            <else/>
                                                <span class="label label-inverse">已下架</span>
                                            </eq>
                                        </td>
                                        <td class="hidden-phone">
                                             <div>
                                                <if condition="checkAccess('Comment', 'index')">
                                                    <a class="btn purple-stripe mini" href="{:U('Comment/index',array('goods_id' => $vo['id']))}">评论</a>
                                                </if>
                                                <if condition="checkAccess(CONTROLLER_NAME, 'edit')">
                                                    <a class="btn yellow-stripe mini" href="{:U(CONTROLLER_NAME.'/edit',array('id' => $vo['id']))}">编辑</a>
                                                </if>
                                                <if condition="checkAccess(CONTROLLER_NAME, 'del')">
                                                    <a class="btn red-stripe mini del" data-id="{$vo.id}" href="javascript:void(0);">删除</a>
                                                </if>
                                            </div>
                                        </td>
                                    </tr>
                                </volist>
                                </tbody>
                            </notempty>
                        </table>
                    </div>
                    <div class="pages clearfix">
                        <div class="control-group pull-left">
                        </div>
                        <include file="Public:page" />
                    </div>
                </div>
            </div>
            <!-- END PAGE CONTENT-->
        </div>
        <!-- END PAGE CONTAINER-->
    </div>
    <!-- END PAGE -->
</div>
<!-- END CONTAINER -->

<include file="Public:footer"/>
<include file="Public:js"/>
<script type="text/javascript">
    $(function(){
        
    })
</script>
<!-- END JAVASCRIPTS -->
</body>
<!-- END BODY -->
</html>